//
// Created by chendong on 2018/1/24.
//
#include <string>
#include <jni.h>
#include <string.h>
#include "my_log.h"

std::string str="We must keep out mind in study";
const char * getString(){
    LOGW("THIS IS LOG FORM NDK");
    return  str.c_str();
}
void spendStr(JNIEnv *env,jstring jstr){
    const char *c = NULL;
    jboolean bl;
    char buff[128] = {0};
    c = env->GetStringUTFChars(jstr, &bl);//获取utf8字符串
    if(c == NULL){
        return;
    }
    sprintf(buff,"hello %s",c);
    LOGI("%s",buff);
    env->ReleaseStringUTFChars(jstr,c);
}